<template>
    <div id="fromdl">
            <div class="demo-input-suffix">
                <el-input
                    placeholder="请输入账号"
                    v-model="admin">
                </el-input>
                <el-input placeholder="请输入密码" v-model="password" show-password></el-input>
            </div>
            <el-button type="primary" @click="dl()">登陆</el-button>
    </div>
</template>

<script>
export default {
    name: "fromdl",
    data(){
        return {
            admin: "",
            password: ""
        }
    },
    methods: {
        dl(){
            if(this.admin && this.password){
                this.axios.get("/api/eee.php",{
                        params: {
                            admin: this.admin,
                            password: this.password
                        }
                    }
                ).then(res=>{
                    if(res.data.zt){
                        alert("登陆成功")
                    }else{
                        alert("登陆失败")
                    }
                })
                .catch(res=>{

                })
            }
        }
    }
}
</script>

<style>
    #fromdl{
        padding: 10px;
    }
    #fromdl .el-input{
        margin-top: 10px;
    }
    #fromdl .el-button{
        margin-top: 10px;
        width: 100%;
    }
</style>
